<?php
declare (strict_types = 1);

namespace app\api\controller;
use app\model\BooksModel;
use app\model\GoodWillModel;
use app\model\RedisModel;
use app\model\UserFbLogModel;
use app\model\UserModel;
use app\model\UserReadingRecordsModel;
use think\App;
use think\facade\Db;

class GoodWill extends Base {

    private $model;

    private $req;

    private $uid;

    private $page;


    public function __construct(App $app)
    {
        parent::__construct($app);

        $this->req = request()->param();

        $this->uid = $this->isLogin();

        $this->page = isset($this->req['page']) ? $this->req['page'] : 1;

        $this->model = new GoodWillModel();
    }





    public function getList(){

        if(!$this->uid){
            return $this->succ();
        }


        $list = $this->model->getList([],$this->page,$this->page);
        if(empty($list)){
            return $this->succ();
        }

        return $this->succ($list);
    }







}
